#!/bin/bash
#
APP_NAME=$1
JAVA_OPTIONS="-Xms256m -Xmx768m -Xss512k -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/${APP_NAME}/logs -verbose:gc -Xloggc:/data/${APP_NAME}/logs/gc.log -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=5m -Duser.timezone=Asia/Shanghai -Dapp.log.home=/data/${APP_NAME}/logs"
echo "java ${JAVA_OPTIONS} -jar /data/source/usefullc-platform/usefullc-${APP_NAME}/target/usefullc-${APP_NAME}.jar > /data/${APP_NAME}/logs/startup.log"
java ${JAVA_OPTIONS} -jar /data/source/usefullc-platform/usefullc-${APP_NAME}/target/usefullc-${APP_NAME}.jar > "/data/${APP_NAME}/logs/startup.log" &
